package com.slz3.business.module.goodsManagement.gooTypeLevel2.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooTypeLevel2.domain.GooTypeLevel2;
import com.slz3.business.module.goodsManagement.gooTypeLevel2.domain.GooTypeLevel2Condition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;
@Component
public class GooTypeLevel2ResAtomic {

    public Mono<ServerResponse> add_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2 gooTypeLevel2) {
        return GooTypeLevel2ResSafeValid.add(req, gooTypeLevel2) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.add(req, gooTypeLevel2);
    }

    public  Mono<ServerResponse> delete_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2Condition gooTypeLevel2Condition) {
        return GooTypeLevel2ResSafeValid.delete(req, gooTypeLevel2Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2 gooTypeLevel2) {
        return GooTypeLevel2ResSafeValid.modify(req, gooTypeLevel2) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.modify(req, gooTypeLevel2);
    }

    public Mono<ServerResponse> info_$GooTypeLevel2UpdateLock(ServerRequest req) {
        return GooTypeLevel2ResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.info(req);
    }

    public  Mono<ServerResponse> auditSubmit_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2Condition gooTypeLevel2Condition) {
        return GooTypeLevel2ResSafeValid.auditSubmit(req, gooTypeLevel2Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.auditSubmit(req);
    }

    public  Mono<ServerResponse> audit_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2Condition gooTypeLevel2Condition) {
        return GooTypeLevel2ResSafeValid.audit(req, gooTypeLevel2Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.audit(req);
    }

    public  Mono<ServerResponse> auditReject_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2Condition gooTypeLevel2Condition) {
        return GooTypeLevel2ResSafeValid.auditReject(req, gooTypeLevel2Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.auditReject(req);
    }


    public  Mono<ServerResponse> usingEnable_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2Condition gooTypeLevel2Condition) {
        return GooTypeLevel2ResSafeValid.usingEnable(req, gooTypeLevel2Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.usingEnable(req);
    }

    public  Mono<ServerResponse> usingDisable_$GooTypeLevel2UpdateLock(ServerRequest req, GooTypeLevel2Condition gooTypeLevel2Condition) {
        return GooTypeLevel2ResSafeValid.usingDisable(req, gooTypeLevel2Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel2ResExecutor.usingDisable(req);
    }
}
